package p270jp.pxv.android.activity;

import android.os.Bundle;
import android.view.MenuItem;
import androidx.compose.p026ui.platform.C0536v1;
import androidx.databinding.DataBindingUtil;
import androidx.databinding.ViewDataBinding;
import androidx.recyclerview.widget.LinearLayoutManager;
import com.google.android.material.appbar.MaterialToolbar;
import p014ae.AbstractActivityC0094i2;
import p041ba.C1048a;
import p045be.PPointExpirationListAdapter;
import p189gn.AbstractC3446l;
import p210hh.PixivAccountManager;
import p270jp.pxv.android.R;
import p270jp.pxv.android.model.ContentRecyclerViewState;
import p270jp.pxv.android.model.ResponseAttacher;
import p270jp.pxv.android.view.ContentRecyclerView;
import p314lg.ActivityPpointExpirationListBinding;
import p325m0.MutabilityOwnership;
import p347mm.DefaultContentRecyclerViewBehavior;
import p436q6.C5768b;
import p467rd.subscribers;
import p517td.BehaviorSubject;
import p603wm.Unit;
import p607x0.C7050l;
import p665z6.C7467v;
import p665z6.C7470y;

/* compiled from: PPointExpirationListActivity.kt */
/* renamed from: jp.pxv.android.activity.PPointExpirationListActivity */
/* loaded from: classes2.dex */
public final class PPointExpirationListActivity extends AbstractActivityC0094i2 {

    /* renamed from: L */
    public static final /* synthetic */ int f18495L;

    /* renamed from: I */
    public final PPointExpirationListAdapter f18496I = new PPointExpirationListAdapter();

    /* renamed from: J */
    public ActivityPpointExpirationListBinding f18497J;

    /* renamed from: K */
    public PPointExpirationListAdapter.C1099a f18498K;

    @Override // p270jp.pxv.android.activity.BaseActivity, androidx.fragment.app.FragmentActivity, androidx.activity.ComponentActivity, p248j2.ActivityC3902g, android.app.Activity
    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        ViewDataBinding d = DataBindingUtil.m11369d(this, R.layout.activity_ppoint_expiration_list);
        MutabilityOwnership.m3746l(d, "setContentView(this, R.l…y_ppoint_expiration_list)");
        ActivityPpointExpirationListBinding a1Var = (ActivityPpointExpirationListBinding) d;
        this.f18497J = a1Var;
        MaterialToolbar materialToolbar = a1Var.f21310s;
        MutabilityOwnership.m3746l(materialToolbar, "binding.toolBar");
        C0536v1.m11537h(this, materialToolbar, R.string.point_expiration_list_title);
        this.f18498K = new PPointExpirationListAdapter.C1099a();
        C7050l lVar = new C7050l(PixivAccountManager.m5511e().m5513c().m970f(C7467v.f31283q).m960p());
        ResponseAttacher responseAttacher = new ResponseAttacher(C7470y.f31331h, new C5768b(this, 11), new C1048a(this, 3));
        ActivityPpointExpirationListBinding a1Var2 = this.f18497J;
        if (a1Var2 != null) {
            ContentRecyclerView contentRecyclerView = a1Var2.f21308q;
            contentRecyclerView.f19470J0 = lVar;
            contentRecyclerView.f19471K0 = responseAttacher;
            contentRecyclerView.m4509v0();
            contentRecyclerView.setAdapter(this.f18496I);
            contentRecyclerView.setLayoutManager(new LinearLayoutManager(1, false));
            ActivityPpointExpirationListBinding a1Var3 = this.f18497J;
            if (a1Var3 != null) {
                DefaultContentRecyclerViewBehavior jVar = new DefaultContentRecyclerViewBehavior(contentRecyclerView, a1Var3.f21309r, null, false);
                BehaviorSubject<ContentRecyclerViewState> state = contentRecyclerView.getState();
                MutabilityOwnership.m3746l(state, "it.state");
                subscribers.m2589g(state, null, null, new AbstractC3446l<ContentRecyclerViewState, Unit>(jVar) { // from class: ae.l6
                    @Override // p189gn.AbstractC3446l
                    public Unit invoke(ContentRecyclerViewState contentRecyclerViewState) {
                        ((DefaultContentRecyclerViewBehavior) this.receiver).mo3534b(contentRecyclerViewState);
                        return Unit.f29503a;
                    }
                }, 3);
                ActivityPpointExpirationListBinding a1Var4 = this.f18497J;
                if (a1Var4 != null) {
                    a1Var4.f21308q.m4506y0();
                } else {
                    MutabilityOwnership.m3737u("binding");
                    throw null;
                }
            } else {
                MutabilityOwnership.m3737u("binding");
                throw null;
            }
        } else {
            MutabilityOwnership.m3737u("binding");
            throw null;
        }
    }

    @Override // androidx.activity.ComponentActivity, android.app.Activity
    public boolean onOptionsItemSelected(MenuItem menuItem) {
        MutabilityOwnership.m3745m(menuItem, "item");
        if (menuItem.getItemId() != 16908332) {
            return super.onOptionsItemSelected(menuItem);
        }
        this.f940i.m12030b();
        return true;
    }
}
